import request from "@/utils/request";
// 查询房屋保洁流程列表
export function listCleaningProcess(params) {
  return request({
    url: "/enterprise/house/cleaningProcess/list",
    method: "get",
    params: params,
  });
}

// 查询保洁流程列表-树形结构
export function treeCleaningProcess(params) {
  return request({
    url: "/enterprise/house/cleaningProcess/tree",
    method: "get",
    params: params,
  });
}

// 获取保洁流程详细信息
export function getCleaningProcess(id) {
  return request({
    url: "/enterprise/house/cleaningProcess/"+id,
    method: "get",
  });
}

// 新增保洁流程--位置
export function addPlace(data) {
  return request({
    url: "/enterprise/house/cleaningProcess/add/place",
    method: "post",
    data: data,
  });
}

// 新增保洁流程--检查点
export function addCheckPoint(data) {
  return request({
    url: "/enterprise/house/cleaningProcess/add/checkPoint",
    method: "post",
    data: data,
  });
}

// 编辑保洁流程名称
export function editCleaningProcess(data) {
  return request({
    url: "/enterprise/house/cleaningProcess",
    method: "put",
    data: data,
  });
}

// 修改保洁流程排序上移
export function moveUpCleaningProcess(id) {
  return request({
    url: "/enterprise/house/cleaningProcess/edit/moveUp/"+id,
    method: "put",
  });
}

// 修改保洁流程排序下移
export function shiftDownCleaningProcess(id) {
  return request({
    url: "/enterprise/house/cleaningProcess/edit/shiftDown/"+id,
    method: "put",
  });
}

// 删除保洁流程
export function deleteCleaningProcess(id) {
  return request({
    url: "/enterprise/house/cleaningProcess/" + id,
    method: "delete",
  });
}
